import pymysql


con= pymysql.connect(host= 'localhost',user= 'root',password= '',database='db3')
cursor= con.cursor()
sql="delete from userinfo where username=%s"
r=cursor.execute(sql,'aa')  

#  修改表时，应该提交，否则原表不变
con.commit()

print(r)
